Systems and methods for content-based document image enhancement

ABSTRACT

A system can include a system processor that is programmed or adapted to classify pixels in a document image, and in some instances, to enhance the document image based upon such classification. Image data including pixels is received. For each pixel in some subset of the image data, a feature vector is generated. Each pixel in the subset is classified as text or image based upon its associated feature vector. The classifications can be outputted for storage and/or further processing. Further processing can include pixel level enhancement processing. Such enhancement processing can include application of a sharpening filter to pixels classified as text and of a smoothing filter to pixels classified as image. In some instances, background suppression can be performed upon a subset of the image data prior to classification.

BACKGROUND

The present invention is directed to systems and methods for enhancingimages of documents. More specifically, without limitation, the presentinvention relates to systems and methods for enhancing images ofdocuments based upon the content of such documents.

Digital copying, in which a digital image is obtained from a scanningdevice and then printed, involves a variety of inherent factors thatcompromise image quality. Ordered halftone patterns in the originaldocument interact with the periodic sampling of the scanner, producingobjectionable moiré patterns. These are exacerbated when the copy isreprinted with an ordered halftone pattern. In addition, limited scanresolution blurs edges, degrading the appearance of detail such as text.Fine detail also suffers from flare, caused by the reflection andscattering of light from the scanner's illumination source. Flare blendstogether nearby colors, blurring the high-frequency content of thedocument.

To suppress moiré, a filter may be constructed that is customized to thefrequencies of interest. However, both the detection of the inputhalftone frequencies and the frequency-domain filtering itself canrequire significant computational effort. Although crude, a simple,small low-pass filter can correct the majority of moiré artifacts.Unfortunately, low-pass filtering affects detail as well, blurring iteven further. Sharpening improves the appearance of text and finedetail, countering the effects of limited scan resolution and flare.Edges become clear and distinct. Of course, other artifacts such asnoise and moiré become sharper as well.

The solution is simple in concept: determine the content of regionswithin the scanned image and then apply the appropriate filter to eachregion. Sharpening should be performed on fine detail, while moirésuppression should be applied to certain periodic artifacts. From theabove discussion, therefore, for an image enhancement system to workproperly, a preprocessing step should include the segmentation of thedocument into text and halftoned images, as well as identification ofbackground. If this step is successfully completed, selection and/orapplication of appropriate additional processing such as filtering,interpolation, optical character recognition or transformation canoccur.

Several techniques have been used to segment documents into text, imagesand background. These techniques have been primarily designed foroptical character recognition (OCR). In these techniques, generally, thedocument is divided into columns. The columns are then separated intorectangular connected regions. Regions that are small are considered tobe text, while large regions are treated as images. These techniques,however, require large portions of the document to be saved in memoryand also require intensive computations, which render them impracticalfor real-time processing.

For enhancement purposes, a simpler and faster way to differentiatebetween text and image regions in scanned documents is to extract edgeinformation. In general, a higher magnitude of edges would suggest highcontrast between a pixel and its neighbors. This is usually anindication of the presence of a text element. Using a predefinedthreshold, a simple classifier can be constructed:

-   -   1. If edge values are higher than a certain threshold then        pixels are classified as text; otherwise they are classified as        images.    -   2. Text pixels are sharpened while image pixels are smoothed.

This technique, however, has several disadvantages. First, thealgorithm, although simple, does not meet real-time computationalconstraints. Next, selecting an edge threshold low enough to sharpen alltext will sharpen other features as well (resulting from misclassifyingimages as text). Finally, increasing the value of the threshold willcause parts of the text (especially fine strokes) to be misclassifiedand potentially blurred.

These and other disadvantages of known techniques are solved in oneembodiment of the present invention by including spatial constraintswith the edge information. Edge thresholds are set high enough to ensuresmooth images, and spatial information ensures that fine text issharpened. The output of this operation significantly improves thequality of the scanned document.

SUMMARY

In one embodiment, the present invention is directed to systems andmethods for enhancing images of documents. One exemplary embodimentaccording to the present invention includes a system processor thatreceives image data associated with a document and enhances it. Someembodiments can include a system data store (SDS) that may store thereceived image data, the enhanced image data and/or both.

The SDS may include multiple physical and/or logical data stores forstoring the various types of information used. Data storage andretrieval functionality may be provided by either the system processoror data storage processors associated with the data store. The systemprocessor is in communication with the SDS via any suitablecommunication channel(s). The system processor may include one or moreprocessing elements that provide analysis, enhancement and/or otherfunctionality.

Accordingly, one exemplary method of document image enhancement includesa variety of steps that may, in certain embodiments, be executed by theenvironment summarized above and more fully described below or be storedas computer executable instructions in and/or on any suitablecombination of computer-readable media. In accordance with one exemplaryembodiment of the present invention, image data associated with adocument containing text and/or image components is received. Featurevectors associated with one or more pixels in the received image dataare generated. Each pixel is then classified as text or image based uponthe feature vectors associated with it. During classification, spatialdistance between a pixel classified as text based upon its featurevector and a pixel previously classified as text are used to refine theclassification. The classifications can then be outputted.

The destination for the outputted classifications can vary in differentembodiments. For instance, some embodiments output the classificationsto an SDS for storage along with the image data. The storedclassifications can then be used by other systems as appropriate. Insome embodiments, the output classifications can feed directly intofurther processing. Such further processing can include, alone or incombination, one or more transformations, application of filters orother pixel level image processing technique known to those skilled inthe art.

Some embodiment may further include a background suppression step priorto classification. In one exemplary embodiment, the background of animage is suppressed as follows. A determination is made as to whether agiven pixel is a background pixel based upon its intensity value. If thegiven pixel is determined to be background, the intensity value is setto a terminal intensity value, typically representing either white orblack. If the given pixel is not determined to be background, theintensity value is mapped into a replacement intensity value accordingto a specified mapping function. Alternatively, other backgroundsuppression techniques may be employed as further detailed below.

Additional advantages of certain embodiments of the invention will beset forth in part in the description which follows, and in part will beobvious from the description, or may be learned by practice of theinvention. The advantages of certain embodiments of the invention willbe realized and attained by means of the elements and combinationsparticularly pointed out in the appended claims. It is to be understoodthat both the foregoing general description and the following detaileddescription are exemplary and explanatory only and are not restrictiveof the invention, as claimed.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of this specification, illustrate embodiments of the invention andtogether with the description, serve to explain the principles of theinvention.

FIG. 1 depicts a hardware diagram of a system processor, or a processingelement thereof, as used in one exemplary embodiment according to thepresent invention.

FIG. 2 is a graph illustrating the required throughput in MHz for agiven printer performance in PPM.

FIG. 3 is a logical block diagram of the components in a typicalimage-processing pipeline used in one embodiment of the presentinvention.

FIG. 4 is a flow chart of one typical classification process accordingto the present invention.

FIG. 5 is a flow chart of one background suppression process accordingto the presenting invention.

FIG. 6 is a flow chart of an approach that can be used to generate anintensity threshold for use in background suppression according to oneembodiment of the presenting invention.

DETAILED DESCRIPTION

Exemplary embodiments of the present invention are now described indetail. Referring to the drawings, like numbers indicate like partsthroughout the views. As used in the description herein and throughoutthe claims that follow, the meaning of “a,” “an,” and “the” includesplural reference unless the context clearly dictates otherwise. Also, asused in the description herein and throughout the claims that follow,the meaning of “in” includes “in” and “on” unless the context clearlydictates otherwise. Finally, as used in the description herein andthroughout the claims that follow, the meanings of “and” and “or”include both the conjunctive and disjunctive and may be usedinterchangeably unless the context clearly dictates otherwise.

Ranges may be expressed herein as from “about” one particular value,and/or to “about” another particular value. When such a range isexpressed, another embodiment includes from the one particular valueand/or to the other particular value. Similarly, when values areexpressed as approximations, by use of the antecedent “about,” it willbe understood that the particular value forms another embodiment. Itwill be further understood that the endpoints of each of the ranges aresignificant both in relation to the other endpoint, and independently ofthe other endpoint.

As used herein, the classification of a pixel as a text pixel is notmeant to limit the pixel to include text. Rather classification as atext pixel shall be understood to include pixels constituting text, lineart, bar codes and/or other image elements having sharp edges and/orhigh contrast.

Architecture of a Typical Access Environment

In one exemplary embodiment, the image enhancement system includes asystem processor potentially including multiple processing elements. Theterm processing element may refer to (1) a process running on aparticular piece, or across particular pieces, of hardware, (2) aparticular piece of hardware, or either (1) or (2) as the contextallows. Each processing element may be supported via a standard generalpurpose processor such as an Intel-compatible processor platformspreferably using at least one PENTIUM III or CELERON (Intel Corp., SantaClara, Calif.) class processor; alternative processors such asUltraSPARC (Sun Microsystems, Palo Alto, Calif.) could be used in otherembodiments. ARM and/or MIPS RISC processors could also be used in someembodiments.

In addition, or instead, one or more special purpose processors such asdigital signal processing (DSP) elements can be included. FIG. 3 is ablock diagram depicting elements in one exemplary embodiment using DSPelements such as TI TMS320c62x or TMS320c64x DSPs (Texas Instruments,Dallas, Tex.). FIG. 3 illustrates an image-processing pipeline 300incorporating several DSP elements 320A, 320B. Image data is receivedfrom an image data source 310. Various FIFO's (first-in-first-outqueues) and associated logic 330A, 330B can be used to queue the datafor forwarding to the DSP elements 320A, 320B. The pipeline includes acontrol logic block 340 for providing DSP program load control,input/output control, communication interfacing (e.g., PCI bus) andfurther queuing such as FIFO 345 handling output of the pipeline. Thedepicted image-processing pipeline can implement the variousclassification and/or enhancement methods according to the presentinvention.

In one exemplary embodiment, the system processor may include one ormore field programmable gate arrays (FPGAs) configured to perform atleast a portion of the enhancement functionality according to thepresent invention; FIG. 1 depicts a particular implementation of onesuch FPGA. The depicted implementation requires approximately 17,000gates for moderate performance and fits in the smallest Xilinx VirtexXCV50–200 MHZz FPGA part. Even if the FPGA requires slow clocking of 35MHz, it would have the capability to support a fast 60 pages-per-minute(PPM) printer. The graph illustrated in FIG. 2 depicts the requiredthroughput in MHz for a given printer performance in PPM.

The system processor may also include one or more application specificintegrated circuits (ASICs); in one exemplary embodiment, the ASIC couldbe designed in accordance with the FPGA design seen in FIG. 1. In someembodiments, the system processor may include a combination of generalpurpose processors, ASICs and/or FPGAs. In some embodiments, imageenhancement functionality, as further described below, may bedistributed across multiple processing elements.

Some embodiments include an SDS that could include a variety of primaryand secondary storage elements. In one exemplary embodiment, the SDSwould include RAM as part of the primary storage; the amount of RAMmight range from 8 MB to 2 GB in embodiments including a computerworkstation, whereas a printer embodiment typically only uses from 512KB to 32 MB. The primary storage may in some embodiments include otherforms of memory such as cache memory, registers, non-volatile memory(e.g., FLASH, ROM, EPROM, etc.), etc. In some exemplary embodiments, theSDS can include an extremely small amount of primary memory sufficientfor storing only a limited number of scan lines.

The SDS may also include secondary storage including single, multipleand/or varied servers and storage elements. For example, the SDS may useinternal storage devices connected to the system processor. Inembodiments where a single processing element supports all of theclassification and image processing functionality, a local hard diskdrive may serve as the secondary storage of the SDS, and a diskoperating system executing on such a single processing element may actas a data server receiving and servicing data requests.

It will be understood by those skilled in the art that the differentinformation used in the image classification, image processing and/orimage enhancement processes and systems according to the presentinvention may be logically or physically segregated within a singledevice serving as secondary storage for the SDS; multiple related datastores accessible through a unified management system, which togetherserve as the SDS; or multiple independent data stores individuallyaccessible through disparate management systems, which may in someembodiments be collectively viewed as the SDS. The various storageelements that comprise the physical architecture of the SDS may becentrally located, or distributed across a variety of diverse locations.

The architecture of the secondary storage of the system data store mayvary significantly in different embodiments. In several embodiments,database(s) are used to store and manipulate the data; in some suchembodiments, one or more relational database management systems, such asDB2 (IBM, White Plains, N.Y.), SQL Server (Microsoft, Redmond, Wash.),ACCESS (Microsoft, Redmond, Wash.), ORACLE 8i (Oracle Corp., RedwoodShores, Calif.), Ingres (Computer Associates, Islandia, N.Y.), MySQL(MySQL AB, Sweden) or Adaptive Server Enterprise (Sybase Inc.,Emeryville, Calif.), may be used in connection with a variety of storagedevices/file servers that may include one or more standard magneticand/or optical disk drives using any appropriate interface including,without limitation, IDE and SCSI. In some embodiments, a tape librarysuch as Exabyte X80 (Exabyte Corporation, Boulder, Colo.), a storageattached network (SAN) solution such as available from (EMC, Inc.,Hopkinton, Mass.), a network attached storage (NAS) solution such as aNetApp Filer 740 (Network Appliances, Sunnyvale, Calif.), orcombinations thereof may be used. In other embodiments, the data storemay use database systems with other architectures such asobject-oriented, spatial, object-relational or hierarchical.

Instead of, or in addition to, those organization approaches discussedabove, certain embodiments may use other storage implementations such ashash tables or flat files or combinations of such architectures. Suchalternative approaches may use data servers other than databasemanagement systems such as a hash table look-up server, procedure and/orprocess and/or a flat file retrieval server, procedure and/or process.Further, the SDS may use a combination of any of such approaches inorganizing its secondary storage architecture.

Some embodiments can also include an imaging component for scanning adocument. The imaging component can be of any suitable type known tothose skilled in the art. Such imaging components can be found in anycommercially available scanner, copier or facsimile machine. The imagingcomponent can be integrated and housed together with the remainingcomponents of a system according to the present invention. In otherembodiments, the imaging component can be housed separately such as in aseparate scanner, copier or facsimile machine and feed image data toremaining components of the document image classification and/orenhancement system.

Various methods and functions as exhibited in various embodimentsaccording to the present invention are described below with respect toimage classification and/or enhancement. In some embodiments, one ormore processing elements within architectures of the environments asdescribed above may execute the steps in such methods and provide suchfunctionality. The functionality may spread across multiple processingelements. In other embodiments, any suitable computer readable storagedevice, media or combination of devices and/or media, including primarystorage such as RAM, ROM, cache memory, etc. or secondary storage suchas magnetic media including fixed and removable disks and tapes; opticalmedia including fixed and removable disks whether read-only orread-write; paper media including punch cards and paper tape; or othersecondary storage as would be known to those skilled in the art, maystore instruction that upon execution by one or more processors causethe one or more processors to execute the steps in such methods and toprovide such functionality.

Content-Based Image Classification and Enhancement

In one exemplary embodiment of the present invention, image data isclassified. FIG. 4 is a flow chart depicting such a classificationprocess. In step 410, image data is received. Image data can be receivedfrom any suitable internal or external source. The received image datacan, in some embodiments, result from the scanning of a source document.In other instances, image data can be received from a prior process orfrom a prior step of a process encompassing the processes according toan embodiment the present invention. As used herein, receipt of theimage data shall include internal generation of the image data.

The image data includes one or more pixels where each pixel has anassociated pixel value. The pixel value can, in some embodiments,consists of multiple component values. Typically, the pixel valuerepresents an intensity value directly, or the intensity value can bederived or selected from the component values of the pixel value. Insome embodiments, the pixel value is, or can include, a gray valuerepresenting the intensity of a pixel in the gray scale associated withthe image. The received image data can be stored in some embodiments.

In some embodiments, a background suppression step 420 occurs asdiscussed in greater detail below. The use of background suppression canincrease contrast and improve document image classification and/orenhancement.

Feature vectors are generated in step 430 for a subset of pixels in theimage data. Typically, this subset is the improper subset including allpixels in the image data; however, some embodiments can allow processingof more limited regions of the image data. In some such embodiments, auser interface can be provided that allows a user to define a region ofinterest such as by allowing entry of numeric values defining the regionor by allowing graphical definition via a suitable input device such asa mouse, tablet, pen interface or the like.

A feature vector is a set of one or more measurements that condenses thedescription of relevant properties of the image into a small, Euclideanfeature space. Each measurement represents an attribute of therespective pixel associated with the feature vector. The number ofnecessary features depends on the complexity of the image. Thecomponents of the feature vector can include, in some embodiments, grayvalues, filtered gray values, texture measures, Markov random fieldfeatures, fractal dimension measures, and gradient magnitudes anddirections.

In one exemplary embodiment, each feature vector includes measurementsobtained from directional edge measures. These measurements are avertical edge parameter and/or a horizontal edge parameter. In one suchembodiments, these parameters are calculated as follows:

Vertical edge parameter|I(x,y+1)−I(x,y−1)|

Horizontal edge parameter|I(x+1,y)−I(x−1,y)|

where I(x,y) is the pixel value at location (x,y), or a scalar valuederived from the components of the pixel values in embodiments where thepixel value is not a scalar. In some embodiments, I(x,y) is the grayvalue of the pixel at location (x,y).

Next, a subset of the pixels for which feature vectors have beengenerated are classified as text or image pixels in step 440. The subsetof pixels typically includes all pixels for which feature vectors havebeen generated but need not in all embodiments.

For each pixel to be classified, a magnitude of its associated featurevector is calculated. In one exemplary embodiment, the magnitude of eachfeature vector is calculated by calculating a norm η of each generatedfeature vector χ, wherein

$\eta = \sqrt{\sum\limits_{i = 1}^{d}\; x_{i}^{2}}$and wherein {x_(i)|i=1,2, . . . , d} are elements of χ. In otherembodiments, the magnitude can be calculated in a number of alternativeways including, without limitation, (1) the mean square (omit the squareroot), (2) the mean absolute value (omit the square root, replace thesquaring with the absolute value), (3), the Nth root of the mean Nthpower, (4) the mean of the Nth power, and/or some combined approach.

An initial determination is then made as to whether to mark the pixelassociated with each feature vector as a potential text element pixel oran image pixel by comparing the calculated magnitude with a selectedthreshold. A user can specify the threshold in some embodiments. Inaddition, or instead, the threshold can be calculated automatically withor without a capability for manual override.

In one such automated approach, the histogram of edge magnitudes acrossthe image is generated, and then peaks within a certain range of thehistogram (e.g., within a certain percentile portion of thedistribution) are selected. The threshold can be selected based upon thechosen peak according to specified heuristics. In either case, a defaultthreshold can be configured for use when no threshold is entered orinsufficient data is available to calculate one.

If the initial determination is that the pixel is an image pixel, thepixel is marked as an image pixel. The term “mark” as used herein withreference to pixels shall refer to any suitable mechanism forassociating a characteristic, attribute or value with one or morepixels. Such mechanism can include, without limitation, providing one ormore attribute arrays corresponding to pixels and reviewing and/orsetting array elements as appropriate, examining and/or flaggingelements within a suitable structure representative of particularpixels, reviewing and/or altering bits in a status portion or separatestatus word associate with each pixel or pixel value, and evaluatingand/or modifying a sign of a value associated with one or more pixels.

If the initial determination is that the pixel is a potential textpixel, a further refinement can occur based upon spatial distancebetween the current pixel and a previously determined text pixel(typically the most recent previously determined text pixel). Forexample, if the spatial distance between the current pixel and a pixelpreviously marked as a potential text element pixel is below a specifieddistance threshold, all pixels in between these two potential textelement pixels are marked as text pixels, and if not, all pixels betweenthese two potential text element pixels are marked as image pixels.

The classification of each classified pixel is output. This output canbe stored in some embodiments. In addition to or instead of storage, theclassification can be output to support display and/or furtherprocessing of the received image data.

Some embodiments can support a variety of processing based upon theclassification. For example, a Hough transformation can be applied toone or more of the pixels classified as text. A descreeningtransformation (also referred to as inverse halftoning) can be appliedto one or more of the pixels classified as image. A filter can beapplied to one or more of the pixels where the filter to be applied isdetermined based upon the classification of the pixel. Some embodimentscan use one or more such processes alone or in combination.

The output of the processing of pixel can be stored in some embodiments.In addition to or instead of storage, the processed pixels can be outputfor display and/or further processing. In some embodiments, theprocessed pixel data is used to overwrite the original pixel data fromthe received image data in storage and/or prior to output. In otherembodiments, the processed pixel data can be stored and/or output inparallel to the pixel data in the originally received image data.

In one exemplary embodiment, a sharpening filter is applied to one ormore pixels classified as text, and/or a smoothing filter is applied toone or more pixels classified as image. The coefficients for asharpening or a smoothing filter can be either fixed or dynamicallydetermined. A fixed coefficient sharpening filter as used in oneparticular embodiment is:

$\quad\begin{bmatrix}{- 1} & {- 1} & {- 1} \\{- 1} & 9 & {- 1} \\{- 1} & {- 1} & {- 1}\end{bmatrix}$A fixed coefficient smoothing filter as used in one particularembodiment is:

$\frac{1}{9}{\quad\begin{bmatrix}1 & 1 & 1 \\1 & 1 & 1 \\1 & 1 & 1\end{bmatrix}}$

In some embodiments employing filters with dynamically determinedcoefficients, the coefficients are generated based upon the receivedimage data; in one such embodiment, the coefficients for a filterapplied to a particular pixel are based upon the spatial distancebetween the particular pixel and the next and/or previous similarlymarked pixel.

Background Suppression

Some embodiments of the present invention include or consist of removingthe background associated with a source image, or some portion thereof.In some embodiments, only pixel data of pixel's identified as backgroundpixels are modified. In some embodiments, the pixel data of all pixelsin the source image data, or portion thereof, are modified. In bothinstances, the pixel data of background pixels are modified to representan intensity corresponding to a terminal intensity.

A terminal intensity as used herein refers to an intensity valuerepresenting one end of an intensity scale associated with the image.For instance in a gray scale image, the terminal intensity would be thevalue, or component values, corresponding to either white or black. Anyarbitrary intensity value could be specified as the terminal intensity;however, intensity corresponding to white or black would typically bechosen. In an embodiment where all pixel data are modified, theintensity value of foreground pixels are mapped according to anysuitable function into the range of intensity value supported by theintensity scale associated with the image.

In some embodiments, a background removal process as depicted in FIG. 5can be used. In step 510, an intensity value associated with each pixelis compared against an intensity threshold. The intensity value in someembodiments can be the pixel value associated with each pixel; in otherembodiments, the intensity value can be derived from the pixel value, orthe component values thereof. It should be noted that this step is notlimited to the greater than comparison depicted in step 510; rather thecomparison to the threshold could be upon any suitable basis includingwithout limitation greater than or equal to, less than, less than orequal to or any other comparative function establishing whether a givepixel is foreground or background based upon established criteria. Instep 510 as depicted, pixels with intensity above a threshold areconsidered background pixels.

In various embodiments, the intensity threshold can be manuallyspecified by a user, configured by default or dynamically calculated.FIG. 6 depicts a threshold calculation process that can be used in someembodiments. In step 610, a histogram distribution of frequency ofoccurrence of intensity values from one or more scan lines of the imagedata is generated. In some such embodiment, ten scan lines can be used;however, other embodiments can use more or fewer scan lines. In step620, a background peak intensity value is determined from the generatedhistogram. In one exemplary embodiment, the background peak intensity isdetermined by selecting the value of the lightest peak in the generatedhistogram. In some embodiments, this background peak intensity value canbe the threshold.

In other embodiments, the threshold can be calculated as a function ofthis background peak intensity value. In some such embodiments, thefunction can use the standard deviation calculated from the histogram aspart of the threshold calculation. As depicted in step 630, the standarddeviation is determined from the generated histogram. The threshold canthen be calculated in step 640. In some embodiments, the function usedto generate the threshold can use the background peak intensity valueless some function of the standard deviation (e.g., twice the standarddeviation).

In step 520 of FIG. 5, the intensity of each pixel determined to be abackground pixel is mapped to a terminal intensity. The pixel value ofthe pixel is modified, or components of the pixel value are modified,accordingly to represent the mapped terminal intensity. In step 530, theintensity of each pixel determined to be a foreground pixel is mapped toan intensity value of within the scale of intensities supported by theimage using a suitable function. The pixel value of the pixel ismodified, or components of the pixel value are modified, accordingly torepresent the mapped intensity. In some embodiments, the function can bea linear mapping of the current intensity value into the full range ofsupported intensities. This can be implemented in some such embodimentsby multiplying the current intensity by a value corresponding to amaximum intensity value and dividing by the intensity threshold.

In one particular embodiment used with eight bit gray scale images, ahistogram generator generates a histogram distribution representing thefrequency of occurrence of the gray values of the first ten scan lines.The histogram distribution is analyzed to determine a background peakgray value of the image, P, and a standard deviation, σ. A gray valuethreshold of P−2σ is calculated. Each pixel in the image data, orportion thereof, is compared with the gray value threshold. If the grayvalue of the pixel is less than the gray value threshold, the value ofthe pixel is mapped linearly from 0 to 255; otherwise, the value of thepixel is mapped to 255 (corresponding to solid white, or to solid blackin some embodiments).

Alternatively, any of a variety of background suppression techniquesknown to those skilled in the art may be used. Such techniques includethose described in U.S. Pat. Nos. 5,157,740; 5,410,617; 5,699,454;5,926,579; and 6,310,697. The contents of each of these patents arehereby incorporated herein by this reference.

Throughout this application, various publications may have beenreferenced. The disclosures of these publications in their entiretiesare hereby incorporated by reference into this application in order tomore fully describe the state of the art to which this inventionpertains.

The embodiments described above are given as illustrative examples only.It will be readily appreciated by those skilled in the art that manydeviations may be made from the specific embodiments disclosed in thisspecification without departing from the invention. Accordingly, thescope of the invention is to be determined by the claims below ratherthan being limited to the specifically described embodiments above.

1. An image processing system, the system comprising a system processorthat is programmed or adapted to: a) receive image data comprising aplurality pixels each having a pixel value; b) selectively mark acurrent pixel as a potential text element; c) determine a distance fromthe current pixel to a previous pixel marked as a potential textelement; d) selectively mark all pixels in between the current andprevious pixels as text pixels or image pixels based upon the determineddistance; e) suppress background in the received image data prior topixel classification by i) determining whether each pixel is abackground pixel by comparing an intensity value associated with eachpixel with an intensity threshold; ii) for each pixel not determined tobe a background pixel, replacing its intensity value with a newintensity value by mapping its current intensity value into a range ofintensity values corresponding to a full intensity spectrum; and iii)for each pixel determined to be a background pixel, replacing itsintensity value with a new pixel intensity value corresponding to aterminal intensity value by mapping its current intensity into a rangeof intensity values corresponding to a full intensity spectrum; andwherein the mapping is performed by multiplying the current intensity bya value corresponding to a maximum intensity value and dividing by theintensity threshold.
 2. The system of claim 1, wherein the systemprocessor selectively marks the current pixel by performing stepscomprising of: a) generating a feature vector for the current pixel,wherein the feature vector comprises one or more elements representingattributes of the current pixel; b) calculating a magnitude for thegenerated feature vector; c) determining whether the current pixel is apotential text element by comparing the calculated magnitude with aselected magnitude threshold; and d) marking the current pixel as apotential text element if the current pixel is determined to be apotential text element.
 3. The system of claim 2, wherein the featurevector generated by the system processor comprises a vertical edgeparameter.
 4. The system of claim 3, wherein the system processor'sgeneration of the feature vector comprises assigning a value equal to|I(x,y+1)−I(x,y−1)| as the vertical edge parameter, wherein I(x,y)corresponds to the pixel value of the pixel associated with coordinatesx and y among the plurality of pixels in the received image data.
 5. Thesystem of claim 2, wherein the feature vector generated by the systemprocessor comprises a horizontal edge parameter.
 6. The system of claim5, wherein the system processor's generation of the feature vectorcomprises assigning a value equal to |I(x+1, y)−I(x−1, y)| as thehorizontal edge parameter, wherein I(x,y) corresponds to the pixel valueof the pixel associated with coordinates x and y among the plurality ofpixels in the received image data.
 7. The system of claim 2, wherein thesystem processor calculates the magnitude of each feature vector bycalculating a norm η of each generated feature vector χ, wherein$\eta = \sqrt{\sum\limits_{i = 1}^{d}\; x_{i}^{2}}$ and wherein{x_(i)|i=1,2, . . . , d} are elements of χ.
 8. The system of claim 1,wherein the system processor is further programmed or adapted to apply afilter to one or more marked pixels in the image data based upon eachpixel's marking as text or image.
 9. The system of claim 7, wherein thesystem processor's application of a filter comprises applying asharpening filter to each pixel marked as text.
 10. The system of claim9, wherein the system processor is further programmed or adapted todynamically determine coefficients of the sharpening filter based uponthe received image data.
 11. The system of claim 10, wherein the systemprocessor's dynamic determination of coefficients of the sharpeningfilter for a particular pixel based upon the spatial distance betweenthe particular pixel and the closest other pixel marked as text.
 12. Thesystem of claim 9, wherein the sharpening filter applied by the systemprocessor has fixed coefficients.
 13. The system of claim 12, whereinthe sharpening filter applied by the system processor is$\quad{\begin{bmatrix}{- 1} & {- 1} & {- 1} \\{- 1} & 9 & {- 1} \\{- 1} & {- 1} & {- 1}\end{bmatrix}.}$
 14. The system of claim 7, wherein the systemprocessor's application of a filter comprises applying a smoothingfilter to each pixel marked as image.
 15. The system of claim 14,wherein the system processor is further programmed or adapted todynamically determine coefficients of the smoothing filter based uponthe received image data.
 16. The system of claim 14, wherein thesmoothing filter applied by the system processor has fixed coefficients.17. The system of claim 16, wherein the smoothing filter applied by thesystem processor is $\frac{1}{9}{\quad{\begin{bmatrix}1 & 1 & 1 \\1 & 1 & 1 \\1 & 1 & 1\end{bmatrix}.}}$
 18. The system of claim 1, further comprising a datastore, in communication with the system processor, that is capable ofstoring image data and wherein the system processor is furtherprogrammed or adapted to store the received image data in the datastore.
 19. The system of claim 18, wherein the system processor isfurther programmed or adapted to apply a filter to one or more markedpixels in the image data based upon each pixel's marking as text orimage and to replace pixel data of the received image data in the datastore with pixel data it generates from applying filters to one or morepixels of the received image data.
 20. The system of claim 1, whereinthe system processor is further programmed or adapted to apply a filterto one or more marked pixels in the image data based upon each pixel'smarking as text or image and further comprising a data store, incommunication with the system processor, that is capable of storingimage data and wherein the system processor is further programmed oradapted to store pixel data of the received image data or pixel datagenerated from applying filters to one or more pixels of the receivedimage data.
 21. The system of claim 20, wherein the system processor isfurther programmed or adapted to store pixel data comprising pixel dataof the received image data and pixel data it generates from applyingfilters to one or more pixels of the received image data.
 22. The systemof claim 1, further comprising an imaging element, in communication withthe system processor, that generates the image data by scanning a sourcedocument.
 23. The system of claim 1, wherein the system processorcomprises a field programmable gate-array or an application-specificintegrated circuit.
 24. The system of claim 1, wherein the systemprocessor is further programmed or adapted to determine the intensitythreshold during background suppression by: 1) generating a histogramdistribution of frequency of occurrence of intensity values from one ormore scan lines of the image data; 2) determining a background peakintensity value for the image data based upon the generated histogramdistribution; and 3) deriving the intensity threshold from thedetermined background peak intensity value.
 25. The system of claim 24,wherein the system processor is further programmed or adapted to derivethe intensity threshold during intensity threshold determination by: (a)determining a standard deviation associated with the generatedhistogram; and (b) subtracting a function of the determined standarddeviation from the determined background peak intensity value to derivethe intensity threshold.
 26. The system of claim 24, wherein the systemprocessor is further programmed or adapted to generate the histogram offrequency of occurrence of intensity values during intensity thresholddetermination using a range of scan lines of the image comprising scanlines one through ten.
 27. The system of claim 1, wherein the systemprocessor further processes one or more pixels of the image data basedupon respective markings of the one or more pixels.
 28. The system ofclaim 1, wherein the system processor processes one or more pixels ofthe image data by performing at least a Hough transformation on one ormore pixels marked as text.
 29. The system of claim 1, wherein thesystem processor processes one or more pixels of the image data byperforming at least a descreening transformation on one or more pixelsmarked as image.
 30. The system of claim 1, wherein the system processorselectively marks all pixels in between the current and previous pixelsas text pixels or image pixels by performing steps comprising ofcomparing the determined distance to a selected distance threshold andif the calculated distance is below the distance threshold, marking allpixels in between the current and previous pixels as text pixels; and ifnot, marking all pixels between the current and previous pixels as imagepixels.
 31. An image processing system for suppressing background inimage data, the image processing system comprising a system processorthat: a) receives image data comprising a plurality pixels each having agray level value; b) generating a histogram distribution of frequency ofoccurrence of gray values from the first ten scan lines of the imagedata; c) determines a background peak gray value for the image databased upon the generated histogram distribution; d) for each pixel valuebelow the determined peak gray value less two standard deviations,replaces its pixel value with a new pixel value by mapping its currentpixel value into a range of pixel values corresponding to a full grayscale spectrum by multiplying the current pixel value by a pixel valuecorresponding to white and dividing by the determined peak gray valueless two standard deviations; and e) for each pixel value not below thedetermined peak gray value less two standard deviations, replacing itspixel value with a new pixel value corresponding to white.
 32. Thesystem of claim 31, further comprising a data store, in communicationwith the system processor, that is capable of storing image data andwherein the system processor is further programmed or adapted to storethe received image data in the data store.
 33. The system of claim 31,further comprising an imaging element, in communication with the systemprocessor, that generates the image data by scanning a source document.34. The system of claim 31, wherein the system processor performs thesteps further comprising: f) selectively marking a current pixel as apotential text element; g) determining a distance from the current pixelto a previous pixel marked as a potential text element; and h)selectively marking all pixels in between the current and previouspixels as text pixels or image pixels based on the determined distance.35. The system of claim 34, wherein the system processor selectivelymarks the current pixel by performing the steps comprising of: a)generating a feature vector for the current pixel, wherein the featurevector comprises one or more elements representing attributes of thecurrent pixel; b) calculating a magnitude for the generated featurevector; c) determining whether the current pixel is a potential textelement by comparing the calculated magnitude with a selected magnitudethreshold; and d) marking the current pixel as a potential text elementif the current pixel is determined to be a potential text element. 36.The system of claim 35, wherein the feature vector generated by thesystem processor comprises a vertical edge parameter.
 37. The system ofclaim 36, wherein the system processor's generation of the featurevector comprises assigning a value equal to |I(x,y+1)−I(x,y−1)| as thevertical edge parameter, wherein I(x,y) corresponds to the pixel valueof the pixel associated with coordinates x andy among the plurality ofpixels in the received image data.
 38. The system of claim 35, whereinthe feature vector generated by the system processor comprises ahorizontal edge parameter.
 39. The system of claim 38, wherein thesystem processor's generation of the feature vector comprises assigninga value equal to |I(x+1, y)−I(x−1, y)| as the horizontal edge parameter,wherein I(x,y) corresponds to the pixel value of the pixel associatedwith coordinates x and y among the plurality of pixels in the receivedimage data.
 40. The system of claim 34, wherein the system processor isfurther programmed or adapted to apply a filter to one or more markedpixels in the image data based upon each pixel's marking as text orimage.
 41. The system of claim 34, wherein the system processorprocesses one or more pixels of the image data by performing at least aHough transformation on one or more pixels marked as text.
 42. Thesystem of claim 34, wherein the system processor processes one or morepixels of the image data by performing at least a descreeningtransformation on one or more pixels marked as image.
 43. The system ofclaim 34, wherein the system processor's application of a filtercomprises applying a smoothing filter to each pixel marked as image.